Specify the following settings to use a custom DataFactory handler.
RDS provides a default handler on the server named MSDFMAP.Handler. (The default customization file is named MSDFMAP.INI.)
Assume that the following sections in MSDFMAP.INI and the data source name, AdvWorks, have been previously defined:
[connect CustomerDataBase]
Access=ReadWrite
Connect="DSN=AdvWorks"
[sql CustomerById]
SQL="SELECT * FROM Customers WHERE CustomerID = ?"
The following code snippets are written in Visual Basic:
RDS.DataControl Version
Dim dc as New RDS.DataControl
Set dc.Handler = "MSDFMAP.Handler"
Set dc.Server = "http://YourServer"
Set dc.Connect = "Data Source=CustomerDatabase"
Set dc.SQL = "CustomerById(4)"
dc.Refresh
Recordset Version
Dim rs as New ADODB.Recordset
rs.CursorLocation = adUseClient
Specify either the Handler property or keyword; the Provider property or keyword; and the CustomerById and CustomerDatabase identifiers. Then open the Recordset object.
rs.Open "CustomerById(4)", "Handler=MSDFMAP.Handler;" & _
"Provider=MS Remote;Data Source=CustomerDatabase;" & _
"Remote Server=http://YourServer"